﻿// =====================================================================
//
//  This file is part of the Microsoft Dynamics CRM SDK code samples.
//
//  Copyright (C) Microsoft Corporation.  All rights reserved.
//
//  This source code is intended only as a supplement to Microsoft
//  Development Tools and/or on-line documentation.  See these other
//  materials for detailed information regarding Microsoft code samples.
//
//  THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//  PARTICULAR PURPOSE.
//
// =====================================================================
using System.Runtime.Serialization;

namespace Microsoft.Xrm.Sdk.Metadata
{
	[DataContract(Name = "OptionSetMetadataBase", Namespace = XmlNamespaces.V5.Metadata)]
	[KnownType(typeof(OptionSetMetadata))]
	[KnownType(typeof(BooleanOptionSetMetadata))]
	public abstract class OptionSetMetadataBase : MetadataBase
	{
		private Label _description;
		private Label _displayName;
		private bool? _isCustomOptionSet;
		private bool? _isGlobal;
		private bool? _isManaged;
		private string _name;
		private OptionSetType? _optionSetType;
		private BooleanManagedProperty _isCustomizable;

		protected OptionSetMetadataBase()
			: base()
		{
		}

		[DataMember]
		public Label Description
		{
			get { return this._description; }
			set { this._description = value; }
		}

		[DataMember]
		public Label DisplayName
		{
			get { return this._displayName; }
			set { this._displayName = value; }
		}

		[DataMember]
		public bool? IsCustomOptionSet
		{
			get { return this._isCustomOptionSet; }
			set { this._isCustomOptionSet = value; }
		}

		[DataMember]
		public bool? IsGlobal
		{
			get { return this._isGlobal; }
			set { this._isGlobal = value; }
		}

		[DataMember]
		public bool? IsManaged
		{
			get { return this._isManaged; }
			internal set { this._isManaged = value; }
		}

		[DataMember]
		public BooleanManagedProperty IsCustomizable
		{
			get { return this._isCustomizable; }
			set { this._isCustomizable = value; }
		}

		[DataMember]
		public string Name
		{
			get { return this._name; }
			set { this._name = value; }
		}

		[DataMember]
		public OptionSetType? OptionSetType
		{
			get { return this._optionSetType; }
			set { this._optionSetType = value; }
		}

	}
}
